package com.pochoF1.daos;

import com.pochoF1.entities.CarreraEntidad;

public class CarreraDAO extends GenericDAO<CarreraEntidad> {

	private static CarreraDAO instance = null;

	protected CarreraDAO() {
	}

	public static CarreraDAO getInstance() {
		if (instance == null) {
			instance = new CarreraDAO();
		}
		return instance;
	}

	public void saveCarrera(CarreraEntidad carrera) throws Exception {
		if(CarreraDAO.getInstance().get(carrera.getCarrera())==null){
			CarreraDAO.getInstance().save(carrera);
		}
		
	}

}
